package servlet.member;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import bean.control.MailHelper;
import bean.control.MemberMgr;

@SuppressWarnings("serial")
public class SendMemberConfirmMailServlet extends HttpServlet {
	protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
		req.setCharacterEncoding("utf-8");
		String stuNum = req.getParameter("stuNum");
		String stuName = req.getParameter("stuName");
		long memId = MemberMgr.queryMemberByStuNum(stuNum).getKey().getId();
		
		MailHelper.sendMemberConfirmMail(stuNum, stuName, memId);
	}
}
